<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class MY_session {

	function start() {
		 $time_to_update	= 60*60*24;
		 $cookie_path		= '/';
		 $cookie_domain	= '';
	
		if (config_item('sess_expiration')) 
			$time_to_update 	= config_item('sess_expiration');
		if (config_item('cookie_path')) 
			$cookie_path 		= config_item('cookie_path');
		if (config_item('cookie_domain')) 
			$cookie_domain 	= config_item('cookie_domain');		
		
		if ( session_id() == ""  ){
			session_set_cookie_params($time_to_update, $cookie_path, $cookie_domain);
			session_start ();
		}
	}
}